package com.ssd.controller;


import com.ssd.entity.Role;
import com.ssd.service.IRoleService;
import com.ssd.view.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户角色表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-14
 */
@RestController
@RequestMapping("/role")
@Api(tags = "用户角色表 前端控制器")
public class RoleController {
    @Resource
    private IRoleService roleService;

    /**
     * 查询所有角色类型集合
     * @return
     */
    @GetMapping
    @ApiOperation(value = "查询所有角色")
    public BaseResponse<List<Role>> findList(){
        return new BaseResponse<>(roleService.list());
    }





}
